home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 1 / PC Actual CD 01.iso / share / dos / graficos / plydat14.arj / LENS.PI < prev    next >
Encoding:
Text File  |  1992-04-05  |  10.8 KB  |  244 lines

  1. // File demonstrating refraction, CSG, etc.
  2. // Polyray input file: Alexander Enzmann
  3.  
  4. // Define the position of the eye based on the frame number
  5. define eye_x_pos 0
  6. define eye_height 4
  7. define eye_dist 10
  8.  
  9. viewpoint {
  10.    from <eye_x_pos,eye_height,-eye_dist>
  11.    at <0,0,0>
  12.    up <0,1,0>
  13.    angle 35
  14.    resolution 512, 512
  15.    }
  16.  
  17. background <0.196078, 0.6, 0.8>
  18. bounding_slab <1, 0, 0>
  19. bounding_slab <0, 1, 0>
  20. bounding_slab <0, 0, 1>
  21. light <-10,10,-10>
  22. include "colors.inc"
  23.  
  24. // Make a convex lens by intersecting two spheres
  25. define convex_lens
  26. object {
  27.      object { sphere <0,0,-0.5>, 1 }
  28.    * object { sphere <0,0, 0.5>, 1 }
  29.    glass
  30.    }
  31.  
  32. // Put two lenses in line - with two lenses the magnified image
  33. // will end up right-side-up.
  34. convex_lens {
  35.    rotate <degrees(atan(eye_height/eye_dist)),0,0>
  36.    translate <0,eye_height/8,-eye_dist/8>
  37.    }
  38. convex_lens {
  39.    rotate <degrees(atan(eye_height/eye_dist)),0,0>
  40.    translate <0,eye_height/2,-eye_dist/2>
  41.    }
  42.  
  43. // Create a ground plane
  44. object {
  45.    polygon 4, <-30, -1.1, -10>, <-30, -1.1, 30>, 
  46.           < 30, -1.1,  30>, < 30, -1.1, -10>
  47.    texture { checker matte_white, matte_black }
  48.    translate <0,-1.1,0>
  49.    }
  50.  
  51. // Make a 13x13 grid of balls of variously colored balls
  52.  
  53. // How big are the balls?
  54. define ball_size 0.15
  55.  
  56. // Make a bunch of little colored balls on the ground
  57. define little_ball
  58.    object { sphere <0, -0.9, 0>, ball_size }
  59.  
  60. // Parameters on objects would be really great here - all
  61. // I want to change between each line of balls is their
  62. // color and their position
  63. little_ball { matte_red     translate <-3.0, 0,-3.0> }
  64. little_ball { matte_blue    translate <-3.0, 0,-2.5> }
  65. little_ball { matte_green   translate <-3.0, 0,-2.0> }
  66. little_ball { matte_cyan    translate <-3.0, 0,-1.5> }
  67. little_ball { matte_yellow  translate <-3.0, 0,-1.0> }
  68. little_ball { matte_magenta translate <-3.0, 0,-0.5> }
  69. little_ball { matte_red     translate <-3.0, 0, 0.0> }
  70. little_ball { matte_blue    translate <-3.0, 0, 0.5> }
  71. little_ball { matte_green   translate <-3.0, 0, 1.0> }
  72. little_ball { matte_cyan    translate <-3.0, 0, 1.5> }
  73. little_ball { matte_yellow  translate <-3.0, 0, 2.0> }
  74. little_ball { matte_magenta translate <-3.0, 0, 2.5> }
  75. little_ball { matte_white   translate <-3.0, 0, 3.0> }
  76.  
  77. little_ball { matte_blue    translate <-2.5, 0,-3.0> }
  78. little_ball { matte_green   translate <-2.5, 0,-2.5> }
  79. little_ball { matte_cyan    translate <-2.5, 0,-2.0> }
  80. little_ball { matte_yellow  translate <-2.5, 0,-1.5> }
  81. little_ball { matte_magenta translate <-2.5, 0,-1.0> }
  82. little_ball { matte_red     translate <-2.5, 0,-0.5> }
  83. little_ball { matte_blue    translate <-2.5, 0, 0.0> }
  84. little_ball { matte_green   translate <-2.5, 0, 0.5> }
  85. little_ball { matte_cyan    translate <-2.5, 0, 1.0> }
  86. little_ball { matte_yellow  translate <-2.5, 0, 1.5> }
  87. little_ball { matte_magenta translate <-2.5, 0, 2.0> }
  88. little_ball { matte_white   translate <-2.5, 0, 2.5> }
  89. little_ball { matte_red     translate <-2.5, 0, 3.0> }
  90.  
  91. little_ball { matte_green   translate <-2.0, 0,-3.0> }
  92. little_ball { matte_cyan    translate <-2.0, 0,-2.5> }
  93. little_ball { matte_yellow  translate <-2.0, 0,-2.0> }
  94. little_ball { matte_magenta translate <-2.0, 0,-1.5> }
  95. little_ball { matte_red     translate <-2.0, 0,-1.0> }
  96. little_ball { matte_blue    translate <-2.0, 0,-0.5> }
  97. little_ball { matte_green   translate <-2.0, 0, 0.0> }
  98. little_ball { matte_cyan    translate <-2.0, 0, 0.5> }
  99. little_ball { matte_yellow  translate <-2.0, 0, 1.0> }
  100. little_ball { matte_magenta translate <-2.0, 0, 1.5> }
  101. little_ball { matte_white   translate <-2.0, 0, 2.0> }
  102. little_ball { matte_red     translate <-2.0, 0, 2.5> }
  103. little_ball { matte_blue    translate <-2.0, 0, 3.0> }
  104.  
  105. little_ball { matte_cyan    translate <-1.5, 0,-3.0> }
  106. little_ball { matte_yellow  translate <-1.5, 0,-2.5> }
  107. little_ball { matte_magenta translate <-1.5, 0,-2.0> }
  108. little_ball { matte_red     translate <-1.5, 0,-1.5> }
  109. little_ball { matte_blue    translate <-1.5, 0,-1.0> }
  110. little_ball { matte_green   translate <-1.5, 0,-0.5> }
  111. little_ball { matte_cyan    translate <-1.5, 0, 0.0> }
  112. little_ball { matte_yellow  translate <-1.5, 0, 0.5> }
  113. little_ball { matte_magenta translate <-1.5, 0, 1.0> }
  114. little_ball { matte_white   translate <-1.5, 0, 1.5> }
  115. little_ball { matte_red     translate <-1.5, 0, 2.0> }
  116. little_ball { matte_blue    translate <-1.5, 0, 2.5> }
  117. little_ball { matte_green   translate <-1.5, 0, 3.0> }
  118.  
  119. little_ball { matte_yellow  translate <-1.0, 0,-3.0> }
  120. little_ball { matte_magenta translate <-1.0, 0,-2.5> }
  121. little_ball { matte_red     translate <-1.0, 0,-2.0> }
  122. little_ball { matte_blue    translate <-1.0, 0,-1.5> }
  123. little_ball { matte_green   translate <-1.0, 0,-1.0> }
  124. little_ball { matte_cyan    translate <-1.0, 0,-0.5> }
  125. little_ball { matte_yellow  translate <-1.0, 0, 0.0> }
  126. little_ball { matte_magenta translate <-1.0, 0, 0.5> }
  127. little_ball { matte_white   translate <-1.0, 0, 1.0> }
  128. little_ball { matte_red     translate <-1.0, 0, 1.5> }
  129. little_ball { matte_blue    translate <-1.0, 0, 2.0> }
  130. little_ball { matte_green   translate <-1.0, 0, 2.5> }
  131. little_ball { matte_cyan    translate <-1.0, 0, 3.0> }
  132.  
  133. little_ball { matte_magenta translate <-0.5, 0,-3.0> }
  134. little_ball { matte_red     translate <-0.5, 0,-2.5> }
  135. little_ball { matte_blue    translate <-0.5, 0,-2.0> }
  136. little_ball { matte_green   translate <-0.5, 0,-1.5> }
  137. little_ball { matte_cyan    translate <-0.5, 0,-1.0> }
  138. little_ball { matte_yellow  translate <-0.5, 0,-0.5> }
  139. little_ball { matte_magenta translate <-0.5, 0, 0.0> }
  140. little_ball { matte_white   translate <-0.5, 0, 0.5> }
  141. little_ball { matte_red     translate <-0.5, 0, 1.0> }
  142. little_ball { matte_blue    translate <-0.5, 0, 1.5> }
  143. little_ball { matte_green   translate <-0.5, 0, 2.0> }
  144. little_ball { matte_cyan    translate <-0.5, 0, 2.5> }
  145. little_ball { matte_yellow  translate <-0.5, 0, 3.0> }
  146.  
  147. little_ball { matte_red     translate < 0.0, 0,-3.0> }
  148. little_ball { matte_blue    translate < 0.0, 0,-2.5> }
  149. little_ball { matte_green   translate < 0.0, 0,-2.0> }
  150. little_ball { matte_cyan    translate < 0.0, 0,-1.5> }
  151. little_ball { matte_yellow  translate < 0.0, 0,-1.0> }
  152. little_ball { matte_magenta translate < 0.0, 0,-0.5> }
  153. little_ball { matte_white   translate < 0.0, 0, 0.0> }
  154. little_ball { matte_red     translate < 0.0, 0, 0.5> }
  155. little_ball { matte_blue    translate < 0.0, 0, 1.0> }
  156. little_ball { matte_green   translate < 0.0, 0, 1.5> }
  157. little_ball { matte_cyan    translate < 0.0, 0, 2.0> }
  158. little_ball { matte_yellow  translate < 0.0, 0, 2.5> }
  159. little_ball { matte_magenta translate < 0.0, 0, 3.0> }
  160.  
  161. little_ball { matte_blue    translate < 0.5, 0,-3.0> }
  162. little_ball { matte_green   translate < 0.5, 0,-2.5> }
  163. little_ball { matte_cyan    translate < 0.5, 0,-2.0> }
  164. little_ball { matte_yellow  translate < 0.5, 0,-1.5> }
  165. little_ball { matte_magenta translate < 0.5, 0,-1.0> }
  166. little_ball { matte_white   translate < 0.5, 0,-0.5> }
  167. little_ball { matte_red     translate < 0.5, 0, 0.0> }
  168. little_ball { matte_blue    translate < 0.5, 0, 0.5> }
  169. little_ball { matte_green   translate < 0.5, 0, 1.0> }
  170. little_ball { matte_cyan    translate < 0.5, 0, 1.5> }
  171. little_ball { matte_yellow  translate < 0.5, 0, 2.0> }
  172. little_ball { matte_magenta translate < 0.5, 0, 2.5> }
  173. little_ball { matte_red     translate < 0.5, 0, 3.0> }
  174.  
  175. little_ball { matte_green   translate < 1.0, 0,-3.0> }
  176. little_ball { matte_cyan    translate < 1.0, 0,-2.5> }
  177. little_ball { matte_yellow  translate < 1.0, 0,-2.0> }
  178. little_ball { matte_magenta translate < 1.0, 0,-1.5> }
  179. little_ball { matte_white   translate < 1.0, 0,-1.0> }
  180. little_ball { matte_red     translate < 1.0, 0,-0.5> }
  181. little_ball { matte_blue    translate < 1.0, 0, 0.0> }
  182. little_ball { matte_green   translate < 1.0, 0, 0.5> }
  183. little_ball { matte_cyan    translate < 1.0, 0, 1.0> }
  184. little_ball { matte_yellow  translate < 1.0, 0, 1.5> }
  185. little_ball { matte_magenta translate < 1.0, 0, 2.0> }
  186. little_ball { matte_red     translate < 1.0, 0, 2.5> }
  187. little_ball { matte_blue    translate < 1.0, 0, 3.0> }
  188.  
  189. little_ball { matte_cyan    translate < 1.5, 0,-3.0> }
  190. little_ball { matte_yellow  translate < 1.5, 0,-2.5> }
  191. little_ball { matte_magenta translate < 1.5, 0,-2.0> }
  192. little_ball { matte_white   translate < 1.5, 0,-1.5> }
  193. little_ball { matte_red     translate < 1.5, 0,-1.0> }
  194. little_ball { matte_blue    translate < 1.5, 0,-0.5> }
  195. little_ball { matte_green   translate < 1.5, 0, 0.0> }
  196. little_ball { matte_cyan    translate < 1.5, 0, 0.5> }
  197. little_ball { matte_yellow  translate < 1.5, 0, 1.0> }
  198. little_ball { matte_magenta translate < 1.5, 0, 1.5> }
  199. little_ball { matte_red     translate < 1.5, 0, 2.0> }
  200. little_ball { matte_blue    translate < 1.5, 0, 2.5> }
  201. little_ball { matte_green   translate < 1.5, 0, 3.0> }
  202.  
  203. little_ball { matte_yellow  translate < 2.0, 0,-3.0> }
  204. little_ball { matte_magenta translate < 2.0, 0,-2.5> }
  205. little_ball { matte_white   translate < 2.0, 0,-2.0> }
  206. little_ball { matte_red     translate < 2.0, 0,-1.5> }
  207. little_ball { matte_blue    translate < 2.0, 0,-1.0> }
  208. little_ball { matte_green   translate < 2.0, 0,-0.5> }
  209. little_ball { matte_cyan    translate < 2.0, 0, 0.0> }
  210. little_ball { matte_yellow  translate < 2.0, 0, 0.5> }
  211. little_ball { matte_magenta translate < 2.0, 0, 1.0> }
  212. little_ball { matte_red     translate < 2.0, 0, 1.5> }
  213. little_ball { matte_blue    translate < 2.0, 0, 2.0> }
  214. little_ball { matte_green   translate < 2.0, 0, 2.5> }
  215. little_ball { matte_cyan    translate < 2.0, 0, 3.0> }
  216.  
  217. little_ball { matte_magenta translate < 2.5, 0,-3.0> }
  218. little_ball { matte_white   translate < 2.5, 0,-2.5> }
  219. little_ball { matte_red     translate < 2.5, 0,-2.0> }
  220. little_ball { matte_blue    translate < 2.5, 0,-1.5> }
  221. little_ball { matte_green   translate < 2.5, 0,-1.0> }
  222. little_ball { matte_cyan    translate < 2.5, 0,-0.5> }
  223. little_ball { matte_yellow  translate < 2.5, 0, 0.0> }
  224. little_ball { matte_magenta translate < 2.5, 0, 0.5> }
  225. little_ball { matte_red     translate < 2.5, 0, 1.0> }
  226. little_ball { matte_blue    translate < 2.5, 0, 1.5> }
  227. little_ball { matte_green   translate < 2.5, 0, 2.0> }
  228. little_ball { matte_cyan    translate < 2.5, 0, 2.5> }
  229. little_ball { matte_yellow  translate < 2.5, 0, 3.0> }
  230.  
  231. little_ball { matte_white   translate < 3.0, 0,-3.0> }
  232. little_ball { matte_red     translate < 3.0, 0,-2.5> }
  233. little_ball { matte_blue    translate < 3.0, 0,-2.0> }
  234. little_ball { matte_green   translate < 3.0, 0,-1.5> }
  235. little_ball { matte_cyan    translate < 3.0, 0,-1.0> }
  236. little_ball { matte_yellow  translate < 3.0, 0,-0.5> }
  237. little_ball { matte_magenta translate < 3.0, 0, 0.0> }
  238. little_ball { matte_red     translate < 3.0, 0, 0.5> }
  239. little_ball { matte_blue    translate < 3.0, 0, 1.0> }
  240. little_ball { matte_green   translate < 3.0, 0, 1.5> }
  241. little_ball { matte_cyan    translate < 3.0, 0, 2.0> }
  242. little_ball { matte_yellow  translate < 3.0, 0, 2.5> }
  243. little_ball { matte_magenta translate < 3.0, 0, 3.0> }
  244.